﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SmartProject.Exceptions
{
    public class InvalidDataParameter : Exception
    {
        private string _internalMessage;

        public InvalidDataParameter(string name, string correctFormat)
        {
            _internalMessage = String.Format("{0} is not in the correct format. It needs to be {1}.", name, correctFormat);
        }

        public InvalidDataParameter(string message)
            : base(message)
        { }

        public override string Message
        {
            get
            {
                return _internalMessage;
            }
        }
    }
}
